import request from "@/utils/request";

// 广告信息管理分页列表
export function getAdvertsApi() {
  return request({
    url: "/adverts/adverts/list",
    method: "get",
  });
}

// 新增广告信息管理
export function addAdvertsApi(data) {
  return request({
    url: "/adverts/adverts",
    method: "post",
    data: data,
  });
}

// 删除广告信息管理
export function deleteAdvertsApi(postId) {
  return request({
    url: "/adverts/adverts/" + postId,
    method: "delete",
  });
}

// 根据id查询广告信息管理详情
export function getAdvertsByIdApi(postId) {
  return request({
    url: "/adverts/adverts/" + postId,
    method: "get",
  });
}

// 修改广告信息管理
export function putAdvertsApi(data) {
  return request({
    url: "/adverts/adverts",
    method: "put",
    data: data,
  });
}
